package com.seawaterbt.mds.service.impl;

import com.seawaterbt.mds.model.Teacher;
import com.seawaterbt.mds.repository.second.TeacherRepository;
import com.seawaterbt.mds.service.TeacherService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
@Slf4j
public class TeacherServiceImpl implements TeacherService {

    @Autowired
    private TeacherRepository repository;

    @Override
    public Integer save(Teacher teacher) {
        teacher = repository.save(teacher);
        return teacher.getId();
    }
}
